Part Number Hot Search : 
DS250 SP74HC10 MAX3624A M6650 SF3010 4HC401 BAV99 BAV99
Product Description
Full Text Search
 

To Download AN1477 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AN1477/1201 1/5 AN1477 application note emulated data eeprom with xflash memory by cmg/mcd application laboratory introduction when the data eeprom is not available in a st7 device, it can be emulated by the xflash memory with some restrictions. this application note describes how to emulate this feature with a st72f264 device and the restrictions this emulation implies. data eeprom can be emulated in all xflash devices (all lite, st72f344, ....). for more information concerning st7 programming, including a .zip file with the complete corresponding code for the st72f264, visit our web site at www.st.com . 1
2/5 emulated data eeprom with xflash memory 1 restrictions 1 to guarantee that the xflash program memory is write protected when programming the emulated data eeprom, the whole program memory must be located in sector 0 (refer to the datasheet). this implies that: C the maximum program memory size is 4 kbytes (sector 0 set by option byte to the maximum size which allows sector 1 availability). C iap is not available for program memory. 2 during emulated data eeprom programming, the xflash can not be executed. this implies that: C the software which programs the emulated data eeprom must be located in ram. this software needs at least 16 bytes of ram as shown in following program example. C the interrupts cannot be served during programming so they have to be masked. 2 procedure to program 1 byte in the emulated data eeprom (located in sector 1) the following steps have to be done: 1 enter the xflash rass key to unlock the access to the fcsr register (only once, after reset for example). 2 download the programming driver into ram (from 0083h to 008fh for example). 3 write the data and address to be programmed in a ram buffer (at ram address 0080h to 0082h for example). 4 call the downloaded ram driver to program the emulated data eeprom. 3 assembler program example the following program example describes a driver routine to be called to emulate data eeprom with an xflash st7 device. this example assumes that all restrictions are taken into account. in this example, the program memory size is 4 kbytes and the data eeprom is also 4 kbytes, but these sizes can be adjusted through option bytes depending on the needs. st7/ ;*************************************************************************** ; title: xdatae2emul.asm ; author: cmg_mcd application team ; description: data eeprom emulation with xflash memory (st72f264 example) ;*************************************************************************** title "xdatae2emul.asm" bytes 2
3/5 emulated data eeprom with xflash memory fcsr equ $72 ; xflash control/status register definition #define lat 1 #define pgm 0 e2data equ $80 ; 1 byte: emul. eeprom data to be programmed e2addr equ $81 ; 2 bytes: emul. eeprom address to be programmed words segment byte at e000-efff 'xflash sect1 -emul data eeprom' segment byte at f000-ffff 'xflash sect0 -program' ; < reset > ld a,#$56 ; enter rass keys to unlock fcsr register ld fcsr,a ld a,#$ae ld fcsr,a ; < user application program > call xemule2_byteprog ; < user application program > ; --------------------------------------------------------------------------- ; routine: xemule2_byteprog ; description: emulated data eeprom byte programming driver routine ; before: a = data to be programmmed ; x:y = address where it has to be programmed [e000h..efffh] ; after: interrupts are disabled ; the requested data byte is programmed ; ressources: ; program size: 40 bytes in sector 0 ; used ram area: 16 bytes from 0080h to 008fh. ; --------------------------------------------------------------------------- .xemule2_byteprog ld e2data,a ; data to be programmed (0080h) is in a ld {e2addr},x ; high address to be programmed (0081h) in x ld {e2addr+1},y ; low address to be programmed (0082h) in y ld x,#$0c ; copy programming software driver
4/5 emulated data eeprom with xflash memory .ram_copy ; into ram from address 0083h ld a,(ram_driver,x) ld ($83,x),a dec x jrpl ram_copy sim ; disable interrupts jp $83 ; call the programming driver located in ram .ram_driver bset fcsr,#lat ; enable emul. eeprom latches ld a, e2data ld [e2addr.w],a ; set address/data to be programmed bset fc sr,#pgm ; launch the emul. eeprom programming .eeprom_prog btjt fcsr,#pgm,eeprom_prog; wait for end of programming (~5ms) ret ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ end
5/5 emulated data eeprom with xflash memory "the present note which is for guidance only aims at providing customers with information regarding their products in order for them to save time. as a result, stmicroelectronics shall not be held liable for any direct, indirect or consequential damages with respect to any claims arising from the content of such a note and/or the use made by customers of the information contained herein in connexion with their products." information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the co nsequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of stmicroelectronics. specifications mentioned in this publicati on are subject to change without notice. this publication supersedes and replaces all information previously supplied. stmicroelectronics prod ucts are not authorized for use as critical components in life support devices or systems without the express written approval of stmicroele ctronics. the st logo is a registered trademark of stmicroelectronics ? 2001 stmicroelectronics - all rights reserved. purchase of i 2 c components by stmicroelectronics conveys a license under the philips i 2 c patent. rights to use these components in an i 2 c system is granted provided that the system conforms to the i 2 c standard specification as defined by philips. stmicroelectronics group of companies australia - brazil - canada - china - finland - france - germany - hong kong - india - israel - italy - japan malaysia - malta - morocco - singapore - spain - sweden - switzerland - united kingdom - u.s.a. http://www.st.com


▲Up To Search▲   

 
Price & Availability of AN1477

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X